Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #85.
Example usage
Changelog
--num-workers
argument todiart.benchmark
diart.inference.Parallelize
, a wrapper forBenchmark
to replace sequential execution with multiprocessingBenchmark
so thatParallelize
can reuse itdiart.stream
now usesrich
progress barsdiart.progress
package withProgressBar
,RichProgressBar
andTQDMProgressBar
as adapters for each libraryChronometer
can now be aware of the progress bar used so that it can print reports with the correct formattingBasePipeline
objects now must be able to communicate their associated configuration class (through theget_config_class()
static method)PipelineConfig.from_namespace()
is nowPipelineConfig.from_dict()
and receives an easily serializable configuration so that workers can instantiate their own pipelines (entire models cannot be sent to child processes)Future improvements and limitations
Optimizer
is still not compatible withParallelize
because some progress bars breaktqdm
withrich
as progress bars in bothBenchmark
andOptimizer
(when not running in parallel)O(num_workers * model_size)
toO(model_size)